import Vue from 'vue'
import VueRouter from 'vue-router'

//首页  作者:张朝辉
import Homes from '../views/Home.vue'
import articles from '../views/Articles.vue'
import articless from '../views/Articless.vue'

import guanggao from '../components/guanggao.vue'
//吃货达人





// 登录 注册 作者:杨浩
import Login from '../views/Login.vue'
import Register from '../views/Register.vue'
import Me from '../views/Me.vue'
import Journalism from '../views/Journalism.vue'
import Article from '../views/Article.vue'

// 个人信息 购物车 作者:吴昌富
import Wode from '../views/Wode.vue'
// import  from '../views/.vue'
import Gouwuche from '../views/Gouwuche.vue'
import Shoucang from '../components/Shoucang.vue'
import Zuji from '../components/Zuji.vue'
import Xiaoxi from '../components/Xiaoxi.vue'
import Lianxikefu from '../components/Lianxikefu.vue'
import Shezhi from '../components/Shezhi.vue'

// 菜谱模块  作者:陈垠泓
import Caipu from '../views/Caipu.vue'
import CaipuDetails from '../views/CaipuDetails.vue'


// 分类  作者:吴 军
import Fenlei from '../views/Fenlei.vue'
import Together from '../views/Together.vue'
import Questions from '../views/Questions.vue'

// 详情页  作者:黄 业
import Xiangqing from '../views/Xiangqing.vue'

Vue.use(VueRouter)

const routes = [
  // 登录 注册 个人信息 新闻 作者:杨浩
  {path:'/login',name:'Login',component:Login},
  {path:'/register',name:'Register',component:Register},
  {path:'/me',name:'Me',component:Me},
  {path:'/journalism',name:'Journalism',component:Journalism},
  {path: '/article/:id',name: 'Article',component: Article},

  // 详情页  作者:黄 业
  {path:'/xiangqing/:id',name:'Xiangqing',component:Xiangqing},

  // 分类  作者:吴 军
  {path:'/fenlei',name:'Fenlei',component:Fenlei},
  {path:'/together',name:'Together',component:Together},
  {path:'/questions',name:'Questions',component:Questions},

  // 菜谱模块  作者:陈垠泓
  {path:'/caipu',name:'Caipu',component:Caipu},
  {path:'/caipuDetails/:id',name:'CaipuDetails',component:CaipuDetails},
  


  // 个人信息 购物车 作者:吴昌富
  {path:'/wode',name:'Wode',component:Wode},
  {path:'/gouwuche',name:'Gouwuche',component:Gouwuche},
  {path:'/shoucang',name:'Shoucang',component:Shoucang},
  {path:'/zuji',name:'Zuji',component:Zuji},
  {path:'/xiaoxi',name:'Xiaoxi',component:Xiaoxi},
  {path:'/lianxikefu',name:'Lianxikefu',component:Lianxikefu},
  {path:'/shezhi',component:Shezhi},

  //首页  作者:张朝辉 
  {
    path: '/homes',
    name: 'Homes',
    component: Homes
  },
  {
    path: '/',
    name: 'guanggao',
    component: guanggao
  },
  {
    path: '/articles',
    name: 'Article',
    component:articles},
  {
    path: '/articless',
    name: 'Article',
    component:articless

  },
 
  // {
  //   path: '/about',
  //   name: 'About',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  // }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
